[llvm-commits] [llvm] r165249 - in /llvm/trunk: include/llvm/DataLayout.h lib/VMCore/CMakeLists.txt lib/VMCore/DataLayout.cpp
Duncan Sands
baldrick at free.fr
Fri Oct 5 00:42:12 PDT 2012
Hi Micah,
> --- llvm/trunk/include/llvm/DataLayout.h (original)
> +++ llvm/trunk/include/llvm/DataLayout.h Thu Oct 4 15:44:22 2012
> @@ -1,4 +1,4 @@
> -//===-- llvm/Target/TargetData.h - Data size & alignment info ---*- C++ -*-===//
> +//===------ llvm/DataLayout.h - Data size & alignment info ------*- C++ -*-===//
> //
> // The LLVM Compiler Infrastructure
> //
> @@ -17,8 +17,8 @@
> //
> //===----------------------------------------------------------------------===//
>
> -#ifndef LLVM_TARGET_TARGETDATA_H
> -#define LLVM_TARGET_TARGETDATA_H
> +#ifndef LLVM_DATALAYOUT_H
> +#define LLVM_DATALAYOUT_H
>
> #include "llvm/Pass.h"
> #include "llvm/ADT/SmallVector.h"
> @@ -65,13 +65,13 @@
> bool operator==(const TargetAlignElem &rhs) const;
> };
>
> -/// TargetData - This class holds a parsed version of the target data layout
> +/// DataLayout - This class holds a parsed version of the target data layout
> /// string in a module and provides methods for querying it. The target data
> /// layout string is specified *by the target* - a frontend generating LLVM IR
> /// is required to generate the right target data for the target being codegen'd
right target data -> right data layout
> /// to. If some measure of portability is desired, an empty string may be
> /// specified in the module.
> -class TargetData : public ImmutablePass {
> +class DataLayout : public ImmutablePass {
> private:
> bool LittleEndian; ///< Defaults to false
> unsigned PointerMemSize; ///< Pointer size in bytes
> @@ -112,7 +112,7 @@
> return &align != &InvalidAlignmentElem;
> }
>
> - /// Initialise a TargetData object with default values, ensure that the
> + /// Initialise a DataLayout object with default values, ensure that the
> /// target data pass is registered.
Presumably you will rename the target data pass to data layout pass at some
point?
> void init();
>
> @@ -121,10 +121,10 @@
> ///
> /// @note This has to exist, because this is a pass, but it should never be
> /// used.
> - TargetData();
> + DataLayout();
>
> - /// Constructs a TargetData from a specification string. See init().
> - explicit TargetData(StringRef TargetDescription)
> + /// Constructs a DataLayout from a specification string. See init().
> + explicit DataLayout(StringRef TargetDescription)
> : ImmutablePass(ID) {
> std::string errMsg = parseSpecifier(TargetDescription, this);
> assert(errMsg == "" && "Invalid target data layout string.");
> @@ -133,13 +133,13 @@
>
> /// Parses a target data specification string. Returns an error message
target data -> data layout
> /// if the string is malformed, or the empty string on success. Optionally
> - /// initialises a TargetData object if passed a non-null pointer.
> - static std::string parseSpecifier(StringRef TargetDescription, TargetData* td = 0);
> + /// initialises a DataLayout object if passed a non-null pointer.
> + static std::string parseSpecifier(StringRef TargetDescription, DataLayout* td = 0);
Ciao, Duncan.
More information about the llvm-commits
mailing list