diff options
-rw-r--r-- | tools/versioner/src/DeclarationDatabase.cpp | 8 | ||||
-rw-r--r-- | tools/versioner/src/Preprocessor.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/tools/versioner/src/DeclarationDatabase.cpp b/tools/versioner/src/DeclarationDatabase.cpp index 3c6f64348..b41c8655e 100644 --- a/tools/versioner/src/DeclarationDatabase.cpp +++ b/tools/versioner/src/DeclarationDatabase.cpp @@ -72,7 +72,7 @@ class Visitor : public RecursiveASTVisitor<Visitor> { // <math.h> maps fool onto foo on 32-bit, since long double is the same as double. if (auto asm_attr = decl->getAttr<AsmLabelAttr>()) { - return asm_attr->getLabel(); + return asm_attr->getLabel().str(); } // The decl might not have a name (e.g. bitfields). @@ -84,7 +84,7 @@ class Visitor : public RecursiveASTVisitor<Visitor> { return mangled; } - return identifier->getName(); + return identifier->getName().str(); } return "<unnamed>"; @@ -173,7 +173,7 @@ class Visitor : public RecursiveASTVisitor<Visitor> { &arch_availability[Arch::x86_64].introduced } }, }; - if (auto it = prefix_map.find(fragments[0]); it != prefix_map.end()) { + if (auto it = prefix_map.find(fragments[0].str()); it != prefix_map.end()) { int value; if (fragments[1].getAsInteger(10, value)) { errx(1, "invalid __ANDROID_AVAILABILITY_DUMP__ annotation: '%s'", @@ -201,7 +201,7 @@ class Visitor : public RecursiveASTVisitor<Visitor> { } Location location = { - .filename = filename, + .filename = filename.str(), .start = { .line = src_manager.getExpansionLineNumber(expansion_range.getBegin()), .column = src_manager.getExpansionColumnNumber(expansion_range.getBegin()), diff --git a/tools/versioner/src/Preprocessor.cpp b/tools/versioner/src/Preprocessor.cpp index 4ee3446f1..7a5b502db 100644 --- a/tools/versioner/src/Preprocessor.cpp +++ b/tools/versioner/src/Preprocessor.cpp @@ -446,7 +446,7 @@ bool preprocessHeaders(const std::string& dst_dir, const std::string& src_dir, continue; } - std::string rel_path = path.substr(src_dir.length() + 1); + std::string rel_path = path.substr(src_dir.length() + 1).str(); std::string dst_path = dst_dir + "/" + rel_path; llvm::StringRef parent_path = llvm::sys::path::parent_path(dst_path); if (llvm::sys::fs::create_directories(parent_path)) { @@ -471,13 +471,13 @@ bool preprocessHeaders(const std::string& dst_dir, const std::string& src_dir, GuardMap guard_map; for (const auto& it : orig_guard_map) { Location loc = it.first; - loc.end = findNextSemicolon(file_lines[file_path], loc.end); + loc.end = findNextSemicolon(file_lines[file_path.str()], loc.end); guard_map[loc] = it.second; } // TODO: Make sure that the Locations don't overlap. // TODO: Merge adjacent non-identical guards. - mergeGuards(file_lines[file_path], guard_map); + mergeGuards(file_lines[file_path.str()], guard_map); if (!file_path.startswith(src_dir)) { errx(1, "input file %s is not in %s\n", file_path.str().c_str(), src_dir.c_str()); @@ -487,7 +487,7 @@ bool preprocessHeaders(const std::string& dst_dir, const std::string& src_dir, llvm::StringRef rel_path = file_path.substr(src_dir.size(), file_path.size() - src_dir.size()); std::string output_path = (llvm::Twine(dst_dir) + rel_path).str(); - rewriteFile(output_path, file_lines[file_path], guard_map); + rewriteFile(output_path, file_lines[file_path.str()], guard_map); } return true; |