From b2cc23df209317cca2a6a785477d000c5528fdd0 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Thu, 10 Jul 2014 22:18:36 +0000 Subject: Be more specific about return types of some methods. This would allow to call addCompilerUsedGlobal on some Clang-generated globals. llvm-svn: 212767 --- clang/lib/CodeGen/CodeGenModule.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.h') diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 649b0e54603..34254697467 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -760,19 +760,22 @@ public: llvm::Constant *GetConstantArrayFromStringLiteral(const StringLiteral *E); /// Return a pointer to a constant array for the given string literal. - llvm::Constant *GetAddrOfConstantStringFromLiteral(const StringLiteral *S); + llvm::GlobalVariable * + GetAddrOfConstantStringFromLiteral(const StringLiteral *S); /// Return a pointer to a constant array for the given ObjCEncodeExpr node. - llvm::Constant *GetAddrOfConstantStringFromObjCEncode(const ObjCEncodeExpr *); + llvm::GlobalVariable * + GetAddrOfConstantStringFromObjCEncode(const ObjCEncodeExpr *); /// Returns a pointer to a character array containing the literal and a /// terminating '\0' character. The result has pointer to array type. /// /// \param GlobalName If provided, the name to use for the global (if one is /// created). - llvm::Constant *GetAddrOfConstantCString(const std::string &str, - const char *GlobalName = nullptr, - unsigned Alignment = 0); + llvm::GlobalVariable * + GetAddrOfConstantCString(const std::string &Str, + const char *GlobalName = nullptr, + unsigned Alignment = 0); /// Returns a pointer to a constant global variable for the given file-scope /// compound literal expression. -- cgit v1.2.3