File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
include/clang/Basic/Targets Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change
1
+ // ===---- SPIR.h - Declare SPIR and SPIR-V target interfaces ----*- C++ -*-===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ // ===----------------------------------------------------------------------===//
8
+
9
+ #pragma once
10
+
11
+ namespace clang {
12
+ namespace targets {
13
+
14
+ // Used by both the SPIR and SPIR-V targets. Code of the generic address space
15
+ // for the target
16
+ constexpr unsigned SPIR_GENERIC_AS = 4u ;
17
+
18
+ } // namespace targets
19
+ } // namespace clang
Original file line number Diff line number Diff line change 11
11
#include " clang/Basic/Diagnostic.h"
12
12
#include " clang/Basic/LangOptions.h"
13
13
#include " clang/Basic/TargetOptions.h"
14
+ #include " clang/Basic/Targets/SPIR.h"
14
15
#include " clang/Frontend/FrontendDiagnostic.h"
15
16
#include " clang/Frontend/Utils.h"
16
17
#include " clang/Lex/HeaderSearchOptions.h"
@@ -1072,7 +1073,7 @@ void EmitAssemblyHelper::EmitAssemblyWithLegacyPassManager(
1072
1073
if (TargetTriple.isSPIR () || TargetTriple.isSPIRV ()) {
1073
1074
// This function pass should run after inlining, so it is added to MPM
1074
1075
PerModulePasses.add (
1075
- createInferAddressSpacesPass (( 4 ))); // TODO make/use the constant
1076
+ createInferAddressSpacesPass (targets::SPIR_GENERIC_AS));
1076
1077
}
1077
1078
}
1078
1079
You can’t perform that action at this time.
0 commit comments