[PATCH] D115842: [llvm-profgen] Fix warning of enumerated and non-enumerated type in conditional expression
Lei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 16 19:29:46 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb239b2b0db72: [llvm-profgen] Fix warning of enumerated and non-enumerated type in conditional… (authored by wlei).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115842/new/
https://reviews.llvm.org/D115842
Files:
llvm/tools/llvm-profgen/PerfReader.cpp
Index: llvm/tools/llvm-profgen/PerfReader.cpp
===================================================================
--- llvm/tools/llvm-profgen/PerfReader.cpp
+++ llvm/tools/llvm-profgen/PerfReader.cpp
@@ -905,8 +905,8 @@
"Branch' source should not be an external address, it should be "
"converted to aritificial branch.");
uint64_t SourceOffset = Binary->virtualAddrToOffset(LBR.Source);
- uint64_t TargetOffset = LBR.Target == ExternalAddr
- ? ExternalAddr
+ uint64_t TargetOffset = LBR.Target == static_cast<uint64_t>(ExternalAddr)
+ ? static_cast<uint64_t>(ExternalAddr)
: Binary->virtualAddrToOffset(LBR.Target);
if (!LBR.IsArtificial && TargetOffset != ExternalAddr) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115842.395046.patch
Type: text/x-patch
Size: 811 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211217/89ca1883/attachment-0001.bin>
More information about the llvm-commits
mailing list