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

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 3 09:35:07 PST 2025


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

I did think about that, but really if you have nested #ifs I don't see any reason why the inner (or outer) condition would have a higher chance of being false.

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


More information about the llvm-commits mailing list