diff options
| author | Amir Ayupov <aaupov@fb.com> | 2025-06-08 17:43:02 -0700 |
|---|---|---|
| committer | Amir Ayupov <aaupov@fb.com> | 2025-06-08 17:43:02 -0700 |
| commit | 68b99df7ad1b910378c8cda5afff637fbe3c0efc (patch) | |
| tree | 1d2e51419c3f89a0909603d355598c27f1a92d42 /clang/lib/CodeGen/CGExprConstant.cpp | |
| parent | bbbecc425389aeb7b93d9018b40a95b389c27f40 (diff) | |
| parent | c480dcddd91e3ff0707d6629e6ddac8587d9d1f1 (diff) | |
[𝘀𝗽𝗿] changes introduced through rebaseusers/aaupov/spr/main.bolt-sort-entrydata
Created using spr 1.3.4
[skip ci]
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 6ba45f42db4d..069cc09cd91d 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -2236,8 +2236,12 @@ ConstantLValueEmitter::tryEmitBase(const APValue::LValueBase &base) { return ConstantLValue(C); }; - if (const auto *FD = dyn_cast<FunctionDecl>(D)) - return PtrAuthSign(CGM.getRawFunctionPointer(FD)); + if (const auto *FD = dyn_cast<FunctionDecl>(D)) { + llvm::Constant *C = CGM.getRawFunctionPointer(FD); + if (FD->getType()->isCFIUncheckedCalleeFunctionType()) + C = llvm::NoCFIValue::get(cast<llvm::GlobalValue>(C)); + return PtrAuthSign(C); + } if (const auto *VD = dyn_cast<VarDecl>(D)) { // We can never refer to a variable with local storage. |
