summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2019-03-26 22:16:53 +0000
committerShoaib Meenai <smeenai@fb.com>2019-03-26 22:16:53 +0000
commit19c45546fc70d705ce3b470fca4289f33d0cdc20 (patch)
tree4c5d650283033a2954e95e2a870b5fafb1c6b842 /clang/lib/Frontend/CompilerInstance.cpp
parent2cabea054e40ae2837da959d0ca89ae25cf1b1f1 (diff)
downloadbcm5719-llvm-19c45546fc70d705ce3b470fca4289f33d0cdc20.tar.gz
bcm5719-llvm-19c45546fc70d705ce3b470fca4289f33d0cdc20.zip
[cmake] Reset variable before using it
A bunch of macros use the same variable name, and since CMake macros don't get their own scope, the value persists across macro invocations, and we can end up exporting targets which shouldn't be exported. Clear the variable before each use to avoid this. Converting these macros to functions would also help, since it would avoid the variable leaking into its parent scope, and that's something I plan to follow up with. It won't fully address the problem, however, since functions still inherit variables from their parent scopes, so if someone in the parent scope just happened to use the same variable name we'd still have the same issue. llvm-svn: 357036
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud