[llvm] 21c9145 - [llvm-profgen][NFC]Fix build failure on different platform

Hongtao Yu via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 16:36:25 PST 2020


Author: wlei
Date: 2020-11-20T16:36:04-08:00
New Revision: 21c91454a81ed9434642605663306685dc546fde

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

LOG: [llvm-profgen][NFC]Fix build failure on different platform

see titile
Test Plan:
ninja & ninja check-llvm

Reviewed By: hoy

Differential Revision: https://reviews.llvm.org/D91897

Added: 
    

Modified: 
    llvm/docs/CommandGuide/llvm-profgen.rst
    llvm/tools/llvm-profgen/CMakeLists.txt
    llvm/tools/llvm-profgen/PerfReader.h
    llvm/tools/llvm-profgen/ProfiledBinary.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/docs/CommandGuide/llvm-profgen.rst b/llvm/docs/CommandGuide/llvm-profgen.rst
index 317c6d813fc0..5197b2318e95 100644
--- a/llvm/docs/CommandGuide/llvm-profgen.rst
+++ b/llvm/docs/CommandGuide/llvm-profgen.rst
@@ -1,5 +1,5 @@
 llvm-profgen - LLVM SPGO profile generation tool
-=================================
+=================================================
 
 .. program:: llvm-profgen
 

diff  --git a/llvm/tools/llvm-profgen/CMakeLists.txt b/llvm/tools/llvm-profgen/CMakeLists.txt
index ee15fb636062..5a631195c28b 100644
--- a/llvm/tools/llvm-profgen/CMakeLists.txt
+++ b/llvm/tools/llvm-profgen/CMakeLists.txt
@@ -1,7 +1,4 @@
-include_directories(
-  ${LLVM_MAIN_SRC_DIR}/lib/Target/X86
-  ${LLVM_BINARY_DIR}/lib/Target/X86
-  )
+
 set(LLVM_LINK_COMPONENTS
   AllTargetsDescs
   AllTargetsDisassemblers

diff  --git a/llvm/tools/llvm-profgen/PerfReader.h b/llvm/tools/llvm-profgen/PerfReader.h
index 5f5295677250..edb97b38f42a 100644
--- a/llvm/tools/llvm-profgen/PerfReader.h
+++ b/llvm/tools/llvm-profgen/PerfReader.h
@@ -69,7 +69,7 @@ class PerfReader {
 
   // The parsed MMap event
   struct MMapEvent {
-    pid_t PID = 0;
+    uint64_t PID = 0;
     uint64_t BaseAddress = 0;
     uint64_t Size = 0;
     uint64_t Offset = 0;

diff  --git a/llvm/tools/llvm-profgen/ProfiledBinary.cpp b/llvm/tools/llvm-profgen/ProfiledBinary.cpp
index a828b7ea3f0f..7ea17c2ea9a7 100644
--- a/llvm/tools/llvm-profgen/ProfiledBinary.cpp
+++ b/llvm/tools/llvm-profgen/ProfiledBinary.cpp
@@ -8,14 +8,12 @@
 
 #include "ProfiledBinary.h"
 #include "ErrorHandling.h"
-#include "MCTargetDesc/X86MCTargetDesc.h"
 #include "llvm/ADT/Triple.h"
 #include "llvm/Demangle/Demangle.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Format.h"
 #include "llvm/Support/TargetRegistry.h"
 #include "llvm/Support/TargetSelect.h"
-#include "llvm/Support/X86TargetParser.h"
 
 #define DEBUG_TYPE "load-binary"
 


        


More information about the llvm-commits mailing list