[llvm] [TableGen] Use SmallVectors for preprocessor include stack. NFC. (PR #121571)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 3 09:17:51 PST 2025


================
@@ -1055,20 +1048,16 @@ bool TGLexer::prepSkipDirectiveEnd() {
 }
 
 bool TGLexer::prepIsProcessingEnabled() {
-  for (const PreprocessorControlDesc &I :
-       llvm::reverse(*PrepIncludeStack.back()))
----------------
mshockwave wrote:

I have no idea why it was using `llvm::reverse` here. Maybe the last element usually has a higher chance to bail out?

https://github.com/llvm/llvm-project/pull/121571


More information about the llvm-commits mailing list