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 | 67694d35548b9752eab26b002e9d0f63111354f8 (patch) | |
| tree | 6bd17ecb8cdad4bb238ce6d9ac939f5744b2698f /lib/CodeGen/ObjectFilePCHContainerOperations.cpp | |
| parent | 5875aeb9efc4aca90b17fc1182ef226bb31f61f7 (diff) | |
| download | clang-67694d35548b9752eab26b002e9d0f63111354f8.tar.gz | |
[clang] - An update after LLVM change.
SectionRef::getName() was changed to return Expected<> (D66089)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@368825 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ObjectFilePCHContainerOperations.cpp')
| -rw-r--r-- | lib/CodeGen/ObjectFilePCHContainerOperations.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/lib/CodeGen/ObjectFilePCHContainerOperations.cpp index 15a2ab99fd..e9b7b36951 100644 --- a/lib/CodeGen/ObjectFilePCHContainerOperations.cpp +++ b/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; |
