[llvm] r347246 - Fix build break from r347239
Paul Robinson via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 19 10:51:11 PST 2018
Author: probinson
Date: Mon Nov 19 10:51:11 2018
New Revision: 347246
URL: http://llvm.org/viewvc/llvm-project?rev=347246&view=rev
Log:
Fix build break from r347239
Modified:
llvm/trunk/examples/Kaleidoscope/Chapter9/toy.cpp
llvm/trunk/include/llvm/IR/DebugInfoMetadata.h
Modified: llvm/trunk/examples/Kaleidoscope/Chapter9/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter9/toy.cpp?rev=347246&r1=347245&r2=347246&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter9/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter9/toy.cpp Mon Nov 19 10:51:11 2018
@@ -1245,9 +1245,8 @@ Function *FunctionAST::codegen() {
unsigned ScopeLine = LineNo;
DISubprogram *SP = DBuilder->createFunction(
FContext, P.getName(), StringRef(), Unit, LineNo,
- CreateFunctionType(TheFunction->arg_size(), Unit),
- false /* internal linkage */, true /* definition */, ScopeLine,
- DINode::FlagPrototyped, false);
+ CreateFunctionType(TheFunction->arg_size(), Unit), ScopeLine,
+ DINode::FlagPrototyped, DISubprogram::SPFlagDefinition);
TheFunction->setSubprogram(SP);
// Push the current scope.
Modified: llvm/trunk/include/llvm/IR/DebugInfoMetadata.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfoMetadata.h?rev=347246&r1=347245&r2=347246&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DebugInfoMetadata.h (original)
+++ llvm/trunk/include/llvm/IR/DebugInfoMetadata.h Mon Nov 19 10:51:11 2018
@@ -1628,9 +1628,10 @@ public:
bool IsOptimized,
unsigned Virtuality = SPFlagNonvirtual) {
// We're assuming virtuality is the low-order field.
- static_assert(SPFlagVirtual == dwarf::DW_VIRTUALITY_virtual &&
- SPFlagPureVirtual == dwarf::DW_VIRTUALITY_pure_virtual,
- "Virtuality constant mismatch");
+ static_assert(
+ int(SPFlagVirtual) == int(dwarf::DW_VIRTUALITY_virtual &&
+ int(SPFlagPureVirtual) == int(dwarf::DW_VIRTUALITY_pure_virtual),
+ "Virtuality constant mismatch");
return static_cast<DISPFlags>((Virtuality & SPFlagVirtuality) |
(IsLocalToUnit ? SPFlagLocalToUnit : 0) |
(IsDefinition ? SPFlagDefinition : 0) |
More information about the llvm-commits
mailing list