Page MenuHomePhabricator

[NFC] Use llvm::SmallVector to workaround XL compiler problem on AIX
ClosedPublic

Authored by Xiangling_L on Mar 9 2021, 8:28 AM.

Details

Summary

LLVM is recommending to use SmallVector (that is, omitting the N), in the absence of a well-motivated choice for the number of inlined elements N.

However, this doesn't work well with XL compiler on AIX since some header(s) aren't properly picked up with it. We need to take a further look into the real issue underneath and fix it in a later patch.

But currently we'd like to use this patch to unblock the build compiler issue first.

Note:
The first build failure was spot here: http://lab.llvm.org:8014/#/builders/126/builds/71

Diff Detail

Event Timeline

Xiangling_L requested review of this revision.Mar 9 2021, 8:28 AM
Xiangling_L created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2021, 8:28 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
daltenty removed a reviewer: Xiangling_L.

Maybe this needs to be addressed in the forward declaration in clang/include/clang/Basic/LLVM.h ?

Maybe this needs to be addressed in the forward declaration in clang/include/clang/Basic/LLVM.h ?

Yeah, adding an additional llvm namespace is a certain another way to workaround this issue. But I think the fix we apply is also a quick way to workaround the build issue. And as I mentioned, we would expect a real fix in a later patch.

This revision is now accepted and ready to land.Mar 9 2021, 9:41 AM
This revision was landed with ongoing or failed builds.Mar 9 2021, 10:04 AM
This revision was automatically updated to reflect the committed changes.