diff options
author | George Rimar <grimar@accesssoftek.com> | 2019-08-14 11:10:01 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2019-08-14 11:10:01 +0000 |
commit | a11d302fa00ba423b09c94491bc868cb991ff379 (patch) | |
tree | f05cb8853be1df0dce7a5dd2a26eebece43a351b /clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp | |
parent | 928bf19b65f32dd58f1ec13633ecd177d2bab32f (diff) | |
download | bcm5719-llvm-a11d302fa00ba423b09c94491bc868cb991ff379.tar.gz bcm5719-llvm-a11d302fa00ba423b09c94491bc868cb991ff379.zip |
[clang] - An update after LLVM change.
SectionRef::getName() was changed to return Expected<> (D66089)
llvm-svn: 368825
Diffstat (limited to 'clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp')
-rw-r--r-- | clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp index 15a2ab99fda..e9b7b369513 100644 --- a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp +++ b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp @@ -335,7 +335,11 @@ ObjectFilePCHContainerReader::ExtractPCH(llvm::MemoryBufferRef Buffer) const { // Find the clang AST section in the container. for (auto &Section : OF->sections()) { StringRef Name; - Section.getName(Name); + if (Expected<StringRef> NameOrErr = Section.getName()) + Name = *NameOrErr; + else + consumeError(NameOrErr.takeError()); + if ((!IsCOFF && Name == "__clangast") || (IsCOFF && Name == "clangast")) { if (Expected<StringRef> E = Section.getContents()) return *E; |