call to getMacroInfo to call it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42725
91177308-0d34-0410-b5e6-
96231b3b80d8
// Next, check to see if the file is wrapped with #ifndef guards. If so, and
// if the macro that guards it is defined, we know the #include has no effect.
- if (FileInfo.ControllingMacro && FileInfo.ControllingMacro->getMacroInfo()) {
+ if (FileInfo.ControllingMacro &&
+ FileInfo.ControllingMacro->hasMacroDefinition()) {
++NumMultiIncludeFileOptzn;
return false;
}
GetStringMapEntryFromValue(*this).getKeyLength();
}
+ /// hasMacroDefinition - Return true if this identifier is #defined to some
+ /// other value.
+ bool hasMacroDefinition() const {
+ return HasMacro;
+ }
+
/// getMacroInfo - Return macro information about this identifier, or null if
/// it is not a macro.
MacroInfo *getMacroInfo() const {