aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 05738c0..ff3480a 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -4461,7 +4461,7 @@ LangAS CodeGenModule::GetGlobalConstantAddressSpace() const {
// casted to Generic pointers which are used to model HIP's "flat" pointers.
return LangAS::cuda_device;
if (auto AS = getTarget().getConstantAddressSpace())
- return AS.getValue();
+ return *AS;
return LangAS::Default;
}
@@ -4736,7 +4736,7 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D,
// Check for alignment specifed in an 'omp allocate' directive.
if (llvm::Optional<CharUnits> AlignValFromAllocate =
getOMPAllocateAlignment(D))
- AlignVal = AlignValFromAllocate.getValue();
+ AlignVal = *AlignValFromAllocate;
GV->setAlignment(AlignVal.getAsAlign());
// On Darwin, unlike other Itanium C++ ABI platforms, the thread-wrapper