[PATCH] D110141: Fixed relative address in LNT profile control-flow graph.
Pavel Kosov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 21 04:25:05 PDT 2021
kpdev42 updated this revision to Diff 373852.
kpdev42 added a comment.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Choose base depending on address string format
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110141/new/
https://reviews.llvm.org/D110141
Files:
lnt/server/ui/static/lnt_profile.js
Index: lnt/server/ui/static/lnt_profile.js
===================================================================
--- lnt/server/ui/static/lnt_profile.js
+++ lnt/server/ui/static/lnt_profile.js
@@ -137,8 +137,10 @@
convertToAddress: function (addressString, addressCurrent) {
// If the address starts with '#' it is a relative one
// and should be processed differently
- if (addressString.startsWith('#'))
- return addressCurrent + parseInt(addressString.substring(1), 10);
+ if (addressString.startsWith('#')) {
+ var base = (addressString.startsWith('#0x') ? 16 : 10);
+ return addressCurrent + parseInt(addressString.substring(1), base);
+ }
else
return parseInt(addressString, 16);
},
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110141.373852.patch
Type: text/x-patch
Size: 767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210921/b8d7d1c9/attachment.bin>
More information about the llvm-commits
mailing list