[llvm] c2ba535 - [ORC] Add an ostream operator for ExecutorAddrRange.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 11 23:09:18 PST 2022


Author: Lang Hames
Date: 2022-01-12T18:03:58+11:00
New Revision: c2ba53518f5459b8e61c44549358065208d62125

URL: https://github.com/llvm/llvm-project/commit/c2ba53518f5459b8e61c44549358065208d62125
DIFF: https://github.com/llvm/llvm-project/commit/c2ba53518f5459b8e61c44549358065208d62125.diff

LOG: [ORC] Add an ostream operator for ExecutorAddrRange.

This makes it easier to print addr ranges in debugging output.

Added: 
    

Modified: 
    llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h b/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h
index 1abc9508d93a8..dc080cfc79d12 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h
@@ -167,6 +167,10 @@ inline raw_ostream &operator<<(raw_ostream &OS, const ExecutorAddr &A) {
   return OS << formatv("{0:x}", A.getValue());
 }
 
+inline raw_ostream &operator<<(raw_ostream &OS, const ExecutorAddrRange &R) {
+  return OS << formatv("{0:x} -- {1:x}", R.Start.getValue(), R.End.getValue());
+}
+
 namespace shared {
 
 class SPSExecutorAddr {};


        


More information about the llvm-commits mailing list