summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index aec7fadcdb4..b8269eb30fe 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -95,8 +95,7 @@ CodeGenFunction::CreateStaticBlockVarDecl(const VarDecl &D,
if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(CurFuncDecl))
ContextName = CGM.getMangledName(FD);
else if (isa<ObjCMethodDecl>(CurFuncDecl))
- ContextName = std::string(CurFn->getNameStart(),
- CurFn->getNameStart() + CurFn->getNameLen());
+ ContextName = CurFn->getName();
else
assert(0 && "Unknown context for block var decl");
OpenPOWER on IntegriCloud