[cfe-commits] r159662 - /cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Tue Jul 3 07:45:10 PDT 2012
Author: chapuni
Date: Tue Jul 3 09:45:09 2012
New Revision: 159662
URL: http://llvm.org/viewvc/llvm-project?rev=159662&view=rev
Log:
clang/utils/TableGen/ClangAttrEmitter.cpp: Fix abuse of StringRef (from getValueAsString()).
Modified:
cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=159662&r1=159661&r2=159662&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Tue Jul 3 09:45:09 2012
@@ -789,7 +789,7 @@
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") {
More information about the cfe-commits
mailing list