summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorMingming Liu <mingmingl@google.com>2025-09-10 15:25:31 -0700
committerGitHub <noreply@github.com>2025-09-10 15:25:31 -0700
commit1417dafa1db9cb1b2b09438aa9f53ea5ab6e36e2 (patch)
tree57f4b1f313c8cf74eed8819870f39c36ea263c68 /clang/lib/CodeGen/CodeGenModule.h
parent898b813bc8a6d0276bf0f4769f5f2f64b34e632d (diff)
parentb8cefcb601ddaa18482555c4ff363c01a270c2fe (diff)
Merge branch 'main' into users/mingmingl-llvm/samplefdo-profile-formatusers/mingmingl-llvm/samplefdo-profile-format
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 705d9a3cb9de..f62350fd8d37 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -17,6 +17,7 @@
#include "CodeGenTypeCache.h"
#include "CodeGenTypes.h"
#include "SanitizerMetadata.h"
+#include "TrapReasonBuilder.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclOpenMP.h"
@@ -1185,9 +1186,8 @@ public:
///
/// \param GlobalName If provided, the name to use for the global (if one is
/// created).
- ConstantAddress
- GetAddrOfConstantCString(const std::string &Str,
- const char *GlobalName = nullptr);
+ ConstantAddress GetAddrOfConstantCString(const std::string &Str,
+ StringRef GlobalName = ".str");
/// Returns a pointer to a constant global variable for the given file-scope
/// compound literal expression.
@@ -1824,6 +1824,11 @@ public:
return PAlign;
}
+ /// Helper function to construct a TrapReasonBuilder
+ TrapReasonBuilder BuildTrapReason(unsigned DiagID, TrapReason &TR) {
+ return TrapReasonBuilder(&getDiags(), DiagID, TR);
+ }
+
private:
bool shouldDropDLLAttribute(const Decl *D, const llvm::GlobalValue *GV) const;