[llvm] r297451 - WholeProgramDevirt: Fixed compilation error under MSVS2015.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 02:31:56 PST 2017
Author: grimar
Date: Fri Mar 10 04:31:56 2017
New Revision: 297451
URL: http://llvm.org/viewvc/llvm-project?rev=297451&view=rev
Log:
WholeProgramDevirt: Fixed compilation error under MSVS2015.
It was introduced in:
r296945
WholeProgramDevirt: Implement exporting for single-impl devirtualization.
---------------------
r296939
WholeProgramDevirt: Add any unsuccessful llvm.type.checked.load devirtualizations to the list of llvm.type.test users.
---------------------
Microsoft Visual Studio Community 2015
Version 14.0.23107.0 D14REL
Does not compile that code without additional brackets, showing multiple error like below:
WholeProgramDevirt.cpp(1216): error C2958: the left bracket '[' found at 'c:\access_softek\llvm\lib\transforms\ipo\wholeprogramdevirt.cpp(1216)' was not matched correctly
WholeProgramDevirt.cpp(1216): error C2143: syntax error: missing ']' before '}'
WholeProgramDevirt.cpp(1216): error C2143: syntax error: missing ';' before '}'
WholeProgramDevirt.cpp(1216): error C2059: syntax error: ']'
Modified:
llvm/trunk/lib/Transforms/IPO/WholeProgramDevirt.cpp
Modified: llvm/trunk/lib/Transforms/IPO/WholeProgramDevirt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/WholeProgramDevirt.cpp?rev=297451&r1=297450&r2=297451&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/WholeProgramDevirt.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/WholeProgramDevirt.cpp Fri Mar 10 04:31:56 2017
@@ -1211,25 +1211,34 @@ bool DevirtModule::run() {
if (!FS)
continue;
// FIXME: Only add live functions.
- for (FunctionSummary::VFuncId VF : FS->type_test_assume_vcalls())
- for (Metadata *MD : MetadataByGUID[VF.GUID])
+ for (FunctionSummary::VFuncId VF : FS->type_test_assume_vcalls()) {
+ for (Metadata *MD : MetadataByGUID[VF.GUID]) {
CallSlots[{MD, VF.Offset}].CSInfo.SummaryHasTypeTestAssumeUsers =
true;
- for (FunctionSummary::VFuncId VF : FS->type_checked_load_vcalls())
- for (Metadata *MD : MetadataByGUID[VF.GUID])
+ }
+ }
+ for (FunctionSummary::VFuncId VF : FS->type_checked_load_vcalls()) {
+ for (Metadata *MD : MetadataByGUID[VF.GUID]) {
CallSlots[{MD, VF.Offset}]
.CSInfo.SummaryTypeCheckedLoadUsers.push_back(FS);
+ }
+ }
for (const FunctionSummary::ConstVCall &VC :
- FS->type_test_assume_const_vcalls())
- for (Metadata *MD : MetadataByGUID[VC.VFunc.GUID])
+ FS->type_test_assume_const_vcalls()) {
+ for (Metadata *MD : MetadataByGUID[VC.VFunc.GUID]) {
CallSlots[{MD, VC.VFunc.Offset}]
- .ConstCSInfo[VC.Args].SummaryHasTypeTestAssumeUsers = true;
+ .ConstCSInfo[VC.Args]
+ .SummaryHasTypeTestAssumeUsers = true;
+ }
+ }
for (const FunctionSummary::ConstVCall &VC :
- FS->type_checked_load_const_vcalls())
- for (Metadata *MD : MetadataByGUID[VC.VFunc.GUID])
+ FS->type_checked_load_const_vcalls()) {
+ for (Metadata *MD : MetadataByGUID[VC.VFunc.GUID]) {
CallSlots[{MD, VC.VFunc.Offset}]
.ConstCSInfo[VC.Args]
.SummaryTypeCheckedLoadUsers.push_back(FS);
+ }
+ }
}
}
}
More information about the llvm-commits
mailing list