[llvm] r327940 - Fix layering between llvm-c and Support by factoring out some typedefs into Support
Jonas Devlieghere via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 20 04:31:44 PDT 2018
Hi Dave,
I had to revert this in r327968. In addition to GreenDragon it was also affecting a bunch of our internal bots.
Thank you for your understanding.
Best regards,
Jonas
> On Mar 20, 2018, at 4:53 AM, Vedant Kumar <vsk at apple.com> wrote:
>
> Hi David,
>
> I think I'm seeing a bot failure related to this commit -- mind taking a look?
>
> http://green.lab.llvm.org/green//job/clang-stage2-coverage-R/2603
>
> FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o
>
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/bin/clang++ -DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Support -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Support -I/usr/include/libxml2 -Iinclude -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -fmodules -fmodules-cache-path=/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/module.cache -fcxx-modules -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics -fprofile-instr-generate='/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/profiles/%6m.profraw' -fcoverage-mapping -O3 -DNDEBUG -fno-exceptions -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o -c /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Support/APSInt.cpp
> While building module 'LLVM_Utils' imported from /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Support/APSInt.cpp:15:
> While building module 'LLVM_C' imported from /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/Support/MemoryBuffer.h:17:
> In file included from <module-includes>:7:
>
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm-c/./Disassembler.h:19:10: fatal error: cyclic dependency in module 'LLVM_Utils': LLVM_Utils -> LLVM_C -> LLVM_Utils
>
> #include "llvm/Support/DisassemblerTypedefs.h"
> ^
> While building module 'LLVM_Utils' imported from /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Support/APSInt.cpp:15:
> In file included from <module-includes>:86:
> In file included from /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/Support/BinaryByteStream.h:20:
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/Support/MemoryBuffer.h:17:10: fatal error: could not build module 'LLVM_C'
> #include "llvm-c/Types.h"
> ~~~~~~~~^~~~~~~~~~~~~~~~
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Support/APSInt.cpp:15:10: fatal error: could not build module 'LLVM_Utils'
> #include "llvm/ADT/APSInt.h"
> ~~~~~~~~^~~~~~~~~~~~~~~~~~~
> 3 errors generated.
>
> vedant
>
>> On Mar 19, 2018, at 7:14 PM, David Blaikie via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>
>> Author: dblaikie
>> Date: Mon Mar 19 19:14:50 2018
>> New Revision: 327940
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=327940&view=rev
>> Log:
>> Fix layering between llvm-c and Support by factoring out some typedefs into Support
>>
>> llvm-c depends on Support, but Support (TargetRegistry) uses some of
>> llvm-c's typedefs. Move those into a Support header to be used from both
>> llvm-c and Support.
>>
>> Added:
>> llvm/trunk/include/llvm/Support/DisassemblerTypedefs.h
>> Modified:
>> llvm/trunk/include/llvm-c/Disassembler.h
>> llvm/trunk/include/llvm/Support/TargetRegistry.h
>>
>> Modified: llvm/trunk/include/llvm-c/Disassembler.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Disassembler.h?rev=327940&r1=327939&r2=327940&view=diff
>> ==============================================================================
>> --- llvm/trunk/include/llvm-c/Disassembler.h (original)
>> +++ llvm/trunk/include/llvm-c/Disassembler.h Mon Mar 19 19:14:50 2018
>> @@ -16,6 +16,7 @@
>> #define LLVM_C_DISASSEMBLER_H
>>
>> #include "llvm/Support/DataTypes.h"
>> +#include "llvm/Support/DisassemblerTypedefs.h"
>> #ifdef __cplusplus
>> #include <cstddef>
>> #else
>> @@ -34,26 +35,6 @@
>> */
>> typedef void *LLVMDisasmContextRef;
>>
>> -/**
>> - * The type for the operand information call back function. This is called to
>> - * get the symbolic information for an operand of an instruction. Typically
>> - * this is from the relocation information, symbol table, etc. That block of
>> - * information is saved when the disassembler context is created and passed to
>> - * the call back in the DisInfo parameter. The instruction containing operand
>> - * is at the PC parameter. For some instruction sets, there can be more than
>> - * one operand with symbolic information. To determine the symbolic operand
>> - * information for each operand, the bytes for the specific operand in the
>> - * instruction are specified by the Offset parameter and its byte widith is the
>> - * size parameter. For instructions sets with fixed widths and one symbolic
>> - * operand per instruction, the Offset parameter will be zero and Size parameter
>> - * will be the instruction width. The information is returned in TagBuf and is
>> - * Triple specific with its specific information defined by the value of
>> - * TagType for that Triple. If symbolic information is returned the function
>> - * returns 1, otherwise it returns 0.
>> - */
>> -typedef int (*LLVMOpInfoCallback)(void *DisInfo, uint64_t PC,
>> - uint64_t Offset, uint64_t Size,
>> - int TagType, void *TagBuf);
>>
>> /**
>> * The initial support in LLVM MC for the most general form of a relocatable
>> @@ -110,23 +91,6 @@ struct LLVMOpInfo1 {
>> #define LLVMDisassembler_VariantKind_ARM64_TLVOFF 6 /* @tvlppageoff */
>>
>> /**
>> - * The type for the symbol lookup function. This may be called by the
>> - * disassembler for things like adding a comment for a PC plus a constant
>> - * offset load instruction to use a symbol name instead of a load address value.
>> - * It is passed the block information is saved when the disassembler context is
>> - * created and the ReferenceValue to look up as a symbol. If no symbol is found
>> - * for the ReferenceValue NULL is returned. The ReferenceType of the
>> - * instruction is passed indirectly as is the PC of the instruction in
>> - * ReferencePC. If the output reference can be determined its type is returned
>> - * indirectly in ReferenceType along with ReferenceName if any, or that is set
>> - * to NULL.
>> - */
>> -typedef const char *(*LLVMSymbolLookupCallback)(void *DisInfo,
>> - uint64_t ReferenceValue,
>> - uint64_t *ReferenceType,
>> - uint64_t ReferencePC,
>> - const char **ReferenceName);
>> -/**
>> * The reference types on input and output.
>> */
>> /* No input reference type or no output reference type. */
>>
>> Added: llvm/trunk/include/llvm/Support/DisassemblerTypedefs.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DisassemblerTypedefs.h?rev=327940&view=auto
>> ==============================================================================
>> --- llvm/trunk/include/llvm/Support/DisassemblerTypedefs.h (added)
>> +++ llvm/trunk/include/llvm/Support/DisassemblerTypedefs.h Mon Mar 19 19:14:50 2018
>> @@ -0,0 +1,60 @@
>> +//===- Support/DisassemblerTypedefs.h ---------------------------*- C++ -*-===//
>> +//
>> +// The LLVM Compiler Infrastructure
>> +//
>> +// This file is distributed under the University of Illinois Open Source
>> +// License. See LICENSE.TXT for details.
>> +//
>> +//===----------------------------------------------------------------------===//
>> +//
>> +// Typedefs used across the boundary between Support and the C API.
>> +//
>> +//===----------------------------------------------------------------------===//
>> +
>> +#ifndef LLVM_SUPPORT_DISASSEMBLERTYPEDEFS_H
>> +#define LLVM_SUPPORT_DISASSEMBLERTYPEDEFS_H
>> +#ifdef __cplusplus
>> +#include <cstddef>
>> +#else
>> +#include <stddef.h>
>> +#endif
>> +
>> +/**
>> + * The type for the operand information call back function. This is called to
>> + * get the symbolic information for an operand of an instruction. Typically
>> + * this is from the relocation information, symbol table, etc. That block of
>> + * information is saved when the disassembler context is created and passed to
>> + * the call back in the DisInfo parameter. The instruction containing operand
>> + * is at the PC parameter. For some instruction sets, there can be more than
>> + * one operand with symbolic information. To determine the symbolic operand
>> + * information for each operand, the bytes for the specific operand in the
>> + * instruction are specified by the Offset parameter and its byte widith is the
>> + * size parameter. For instructions sets with fixed widths and one symbolic
>> + * operand per instruction, the Offset parameter will be zero and Size parameter
>> + * will be the instruction width. The information is returned in TagBuf and is
>> + * Triple specific with its specific information defined by the value of
>> + * TagType for that Triple. If symbolic information is returned the function
>> + * returns 1, otherwise it returns 0.
>> + */
>> +typedef int (*LLVMOpInfoCallback)(void *DisInfo, uint64_t PC,
>> + uint64_t Offset, uint64_t Size,
>> + int TagType, void *TagBuf);
>> +
>> +/**
>> + * The type for the symbol lookup function. This may be called by the
>> + * disassembler for things like adding a comment for a PC plus a constant
>> + * offset load instruction to use a symbol name instead of a load address value.
>> + * It is passed the block information is saved when the disassembler context is
>> + * created and the ReferenceValue to look up as a symbol. If no symbol is found
>> + * for the ReferenceValue NULL is returned. The ReferenceType of the
>> + * instruction is passed indirectly as is the PC of the instruction in
>> + * ReferencePC. If the output reference can be determined its type is returned
>> + * indirectly in ReferenceType along with ReferenceName if any, or that is set
>> + * to NULL.
>> + */
>> +typedef const char *(*LLVMSymbolLookupCallback)(void *DisInfo,
>> + uint64_t ReferenceValue,
>> + uint64_t *ReferenceType,
>> + uint64_t ReferencePC,
>> + const char **ReferenceName);
>> +#endif
>>
>> Modified: llvm/trunk/include/llvm/Support/TargetRegistry.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/TargetRegistry.h?rev=327940&r1=327939&r2=327940&view=diff
>> ==============================================================================
>> --- llvm/trunk/include/llvm/Support/TargetRegistry.h (original)
>> +++ llvm/trunk/include/llvm/Support/TargetRegistry.h Mon Mar 19 19:14:50 2018
>> @@ -19,12 +19,12 @@
>> #ifndef LLVM_SUPPORT_TARGETREGISTRY_H
>> #define LLVM_SUPPORT_TARGETREGISTRY_H
>>
>> -#include "llvm-c/Disassembler.h"
>> #include "llvm/ADT/Optional.h"
>> #include "llvm/ADT/StringRef.h"
>> #include "llvm/ADT/Triple.h"
>> #include "llvm/ADT/iterator_range.h"
>> #include "llvm/Support/CodeGen.h"
>> +#include "llvm/Support/DisassemblerTypedefs.h"
>> #include "llvm/Support/ErrorHandling.h"
>> #include "llvm/Support/FormattedStream.h"
>> #include <algorithm>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list