Browse files

clang/utils/TableGen/ClangAttrEmitter.cpp: Fix abuse of StringRef (fr…

…om getValueAsString()).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159662 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information...
1 parent 402a6d5 commit 41de13b3b6f7bb92d8d7aca965472086eee463cf @chapuni chapuni committed Jul 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 utils/TableGen/ClangAttrEmitter.cpp
View
2 utils/TableGen/ClangAttrEmitter.cpp
@@ -789,7 +789,7 @@ void EmitClangAttrImpl(RecordKeeper &Records, raw_ostream &OS) {
OS << "void " << R.getName() << "Attr::printPretty("
<< "llvm::raw_ostream &OS, ASTContext &Ctx) const {\n";
if (Spellings.begin() != Spellings.end()) {
- StringRef Spelling = (*Spellings.begin())->getValueAsString("Name");
+ std::string Spelling = (*Spellings.begin())->getValueAsString("Name");
OS << " OS << \" __attribute__((" << Spelling;
if (Args.size()) OS << "(";
if (Spelling == "availability") {

0 comments on commit 41de13b

Please sign in to comment.