@@ -125,16 +125,19 @@ class OpenMPIRBuilderConfig {
125125
126126 // / First separator used between the initial two parts of a name.
127127 std::optional<StringRef> FirstSeparator;
128- // / Separator used between all of the rest consecutive parts of s name
128+ // / Separator used between all of the rest consecutive parts of s name.
129129 std::optional<StringRef> Separator;
130130
131- // Grid Value for the GPU target
131+ // Grid Value for the GPU target.
132132 std::optional<omp::GV> GridValue;
133133
134134 // / When compilation is being done for the OpenMP host (i.e. `IsTargetDevice =
135135 // / false`), this contains the list of offloading triples associated, if any.
136136 SmallVector<Triple> TargetTriples;
137137
138+ // Default address space for the target.
139+ unsigned DefaultTargetAS = 0 ;
140+
138141 LLVM_ABI OpenMPIRBuilderConfig ();
139142 LLVM_ABI OpenMPIRBuilderConfig (bool IsTargetDevice, bool IsGPU,
140143 bool OpenMPOffloadMandatory,
@@ -165,6 +168,8 @@ class OpenMPIRBuilderConfig {
165168 return *GridValue;
166169 }
167170
171+ unsigned getDefaultTargetAS () const { return DefaultTargetAS; }
172+
168173 bool hasRequiresFlags () const { return RequiresFlags; }
169174 LLVM_ABI bool hasRequiresReverseOffload () const ;
170175 LLVM_ABI bool hasRequiresUnifiedAddress () const ;
@@ -202,6 +207,7 @@ class OpenMPIRBuilderConfig {
202207 void setFirstSeparator (StringRef FS) { FirstSeparator = FS; }
203208 void setSeparator (StringRef S) { Separator = S; }
204209 void setGridValue (omp::GV G) { GridValue = G; }
210+ void setDefaultTargetAS (unsigned AS) { DefaultTargetAS = AS; }
205211
206212 LLVM_ABI void setHasRequiresReverseOffload (bool Value);
207213 LLVM_ABI void setHasRequiresUnifiedAddress (bool Value);
0 commit comments