[llvm-branch-commits] [compiler-rt] release/19.x: [InstrProf] Remove duplicate definition of IntPtrT (PR #101061)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jul 29 11:45:30 PDT 2024


https://github.com/llvmbot created https://github.com/llvm/llvm-project/pull/101061

Backport 2c376fe96c83443c15e6485d043ebe321904546b

Requested by: @DimitryAndric

>From f22f6af2155b87d4994d6dd18ebc5a2eb152f418 Mon Sep 17 00:00:00 2001
From: Dimitry Andric <dimitry at andric.com>
Date: Mon, 29 Jul 2024 20:34:01 +0200
Subject: [PATCH] [InstrProf] Remove duplicate definition of IntPtrT

In 16e74fd48988a (for #82711) a duplicate definition of `IntPtrT` was
added to `InstrProfiling.h`, leading to warnings:

    compiler-rt/lib/profile/InstrProfiling.h:52:15: warning: redefinition of typedef 'IntPtrT' is a C11 feature [-Wtypedef-redefinition]
       52 | typedef void *IntPtrT;
          |               ^
    compiler-rt/lib/profile/InstrProfiling.h:34:15: note: previous definition is here
       34 | typedef void *IntPtrT;
          |               ^

Fix the warnings by removing the duplicate typedef.

(cherry picked from commit 2c376fe96c83443c15e6485d043ebe321904546b)
---
 compiler-rt/lib/profile/InstrProfiling.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/compiler-rt/lib/profile/InstrProfiling.h b/compiler-rt/lib/profile/InstrProfiling.h
index d424a22c212c3..6906d52eacaf1 100644
--- a/compiler-rt/lib/profile/InstrProfiling.h
+++ b/compiler-rt/lib/profile/InstrProfiling.h
@@ -49,7 +49,6 @@ typedef struct ValueProfNode {
 #include "profile/InstrProfData.inc"
 } ValueProfNode;
 
-typedef void *IntPtrT;
 typedef struct COMPILER_RT_ALIGNAS(INSTR_PROF_DATA_ALIGNMENT) VTableProfData {
 #define INSTR_PROF_VTABLE_DATA(Type, LLVMType, Name, Initializer) Type Name;
 #include "profile/InstrProfData.inc"



More information about the llvm-branch-commits mailing list