diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 11 |
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; |
