aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/CGBlocks.cpp6
-rw-r--r--lib/CodeGen/CodeGenFunction.h6
-rw-r--r--lib/CodeGen/CodeGenModule.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index ecc9406b2f..f1788b0db7 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -147,9 +147,9 @@ llvm::Constant *CodeGenFunction::BuildBlockLiteralTmp(const BlockExpr *BE) {
Elts.push_back(C);
// __FuncPtr
- std::string Name;
+ const char *Name;
if (const NamedDecl *ND = dyn_cast<NamedDecl>(CurFuncDecl))
- Name = ND->getNameAsString();
+ Name = ND->getNameAsCString();
BlockInfo Info(0, Name);
llvm::Function *Fn = CodeGenFunction(*this).GenerateBlockFunction(BE, Info);
Elts.push_back(Fn);
@@ -292,7 +292,7 @@ RValue CodeGenFunction::EmitBlockCallExpr(const CallExpr* E) {
}
llvm::Constant *
-CodeGenModule::GetAddrOfGlobalBlock(const BlockExpr *BE, std::string n) {
+CodeGenModule::GetAddrOfGlobalBlock(const BlockExpr *BE, const char * n) {
// Generate the block descriptor.
const llvm::Type *UnsignedLongTy = Types.ConvertType(Context.UnsignedLongTy);
const llvm::IntegerType *IntTy = cast<llvm::IntegerType>(
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index 038db1b305..5f42a429e0 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -256,15 +256,15 @@ public:
const llvm::Type *BlockLiteralTy;
/// Name - the name of the function this block was created for, if any
- std::string Name;
+ const char *Name;
- BlockInfo(const llvm::Type *blt, std::string n)
+ BlockInfo(const llvm::Type *blt, const char *n)
: BlockLiteralTy(blt), Name(n) {}
};
llvm::Function *GenerateBlockFunction(const BlockExpr *Expr,
const BlockInfo& Info);
-
+
void GenerateCode(const FunctionDecl *FD,
llvm::Function *Fn);
void StartFunction(const Decl *D, QualType RetTy,
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index e5c412a75c..ff1437c20d 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -219,7 +219,7 @@ public:
llvm::Constant *GetAddrOfConstantCString(const std::string &str,
const char *GlobalName=0);
- llvm::Constant *GetAddrOfGlobalBlock(const BlockExpr *BE, std::string);
+ llvm::Constant *GetAddrOfGlobalBlock(const BlockExpr *BE, const char *);
/// getBuiltinLibFunction - Given a builtin id for a function like
/// "__builtin_fabsf", return a Function* for "fabsf".