[PATCH] D107469: Reword writeDIGenericSubrange
Alf via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 4 08:49:24 PDT 2021
gAlfonso-bit created this revision.
Herald added subscribers: dexonsmith, hiraditya.
gAlfonso-bit requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The expression at the end is needlessly complex so I have simplified it
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D107469
Files:
llvm/lib/IR/AsmWriter.cpp
Index: llvm/lib/IR/AsmWriter.cpp
===================================================================
--- llvm/lib/IR/AsmWriter.cpp
+++ llvm/lib/IR/AsmWriter.cpp
@@ -29,7 +29,6 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/BinaryFormat/Dwarf.h"
-#include "llvm/Config/llvm-config.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/AssemblyAnnotationWriter.h"
#include "llvm/IR/Attributes.h"
@@ -1931,10 +1930,9 @@
auto IsConstant = [&](Metadata *Bound) -> bool {
if (auto *BE = dyn_cast_or_null<DIExpression>(Bound)) {
- return BE->isConstant()
- ? DIExpression::SignedOrUnsignedConstant::SignedConstant ==
- *BE->isConstant()
- : false;
+ return BE->isConstant() &&
+ DIExpression::SignedOrUnsignedConstant::SignedConstant ==
+ *BE->isConstant();
}
return false;
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107469.364121.patch
Type: text/x-patch
Size: 928 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210804/c482f2c9/attachment.bin>
More information about the llvm-commits
mailing list