summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2019-08-14 11:10:01 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2019-08-14 11:10:01 +0000
commita11d302fa00ba423b09c94491bc868cb991ff379 (patch)
treef05cb8853be1df0dce7a5dd2a26eebece43a351b /clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
parent928bf19b65f32dd58f1ec13633ecd177d2bab32f (diff)
downloadbcm5719-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.cpp6
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;
OpenPOWER on IntegriCloud