aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/TestModuleFileExtension.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2021-03-02 13:14:00 +0100
committerJan Svoboda <jan_svoboda@apple.com>2021-03-02 13:14:00 +0100
commit08ccea019fda514ae36454f8d607b6c3cb08698e (patch)
tree884b28c4b07ee93f278956b04ce02bcc24b204fd /clang/lib/Frontend/TestModuleFileExtension.cpp
parent25b788716bb26aec4bb0c5ac8073d27cefe9eb8c (diff)
downloadllvm-08ccea019fda514ae36454f8d607b6c3cb08698e.zip
llvm-08ccea019fda514ae36454f8d607b6c3cb08698e.tar.gz
llvm-08ccea019fda514ae36454f8d607b6c3cb08698e.tar.bz2
[clang][cli] NFC: Use .str() instead of operator<<
Diffstat (limited to 'clang/lib/Frontend/TestModuleFileExtension.cpp')
-rw-r--r--clang/lib/Frontend/TestModuleFileExtension.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/clang/lib/Frontend/TestModuleFileExtension.cpp b/clang/lib/Frontend/TestModuleFileExtension.cpp
index 0460969..ec147e1 100644
--- a/clang/lib/Frontend/TestModuleFileExtension.cpp
+++ b/clang/lib/Frontend/TestModuleFileExtension.cpp
@@ -128,11 +128,10 @@ TestModuleFileExtension::createExtensionReader(
new TestModuleFileExtension::Reader(this, Stream));
}
-namespace clang {
-llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
- const TestModuleFileExtension &Extension) {
- return OS << Extension.BlockName << ":" << Extension.MajorVersion << ":"
- << Extension.MinorVersion << ":" << Extension.Hashed << ":"
- << Extension.UserInfo;
+std::string TestModuleFileExtension::str() const {
+ std::string Buffer;
+ llvm::raw_string_ostream OS(Buffer);
+ OS << BlockName << ":" << MajorVersion << ":" << MinorVersion << ":" << Hashed
+ << ":" << UserInfo;
+ return OS.str();
}
-} // namespace clang