[llvm-commits] [llvm] r165920 - in /llvm/trunk: include/llvm/Attributes.h include/llvm/AttributesImpl.h lib/VMCore/Attributes.cpp lib/VMCore/AttributesImpl.h lib/VMCore/LLVMContextImpl.h
Bill Wendling
isanbard at gmail.com
Sun Oct 14 22:40:12 PDT 2012
Author: void
Date: Mon Oct 15 00:40:12 2012
New Revision: 165920
URL: http://llvm.org/viewvc/llvm-project?rev=165920&view=rev
Log:
Move the AttributesImpl header file into the VMCore directory so that it can be opaque.
Added:
llvm/trunk/lib/VMCore/AttributesImpl.h
- copied unchanged from r165919, llvm/trunk/include/llvm/AttributesImpl.h
Removed:
llvm/trunk/include/llvm/AttributesImpl.h
Modified:
llvm/trunk/include/llvm/Attributes.h
llvm/trunk/lib/VMCore/Attributes.cpp
llvm/trunk/lib/VMCore/LLVMContextImpl.h
Modified: llvm/trunk/include/llvm/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=165920&r1=165919&r2=165920&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Attributes.h (original)
+++ llvm/trunk/include/llvm/Attributes.h Mon Oct 15 00:40:12 2012
@@ -15,7 +15,6 @@
#ifndef LLVM_ATTRIBUTES_H
#define LLVM_ATTRIBUTES_H
-#include "llvm/AttributesImpl.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/ADT/ArrayRef.h"
#include <cassert>
@@ -172,9 +171,7 @@
bool hasAttribute(AttrVal Val) const;
/// @brief Return true if attributes exist
- bool hasAttributes() const {
- return Attrs && Attrs->hasAttributes();
- }
+ bool hasAttributes() const;
/// @brief Return true if the attributes are a non-null intersection.
bool hasAttributes(const Attributes &A) const;
Removed: llvm/trunk/include/llvm/AttributesImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/AttributesImpl.h?rev=165919&view=auto
==============================================================================
--- llvm/trunk/include/llvm/AttributesImpl.h (original)
+++ llvm/trunk/include/llvm/AttributesImpl.h (removed)
@@ -1,51 +0,0 @@
-//===-- AttributesImpl.h - Attributes Internals -----------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines various helper methods and classes used by LLVMContextImpl
-// for creating and managing attributes.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_ATTRIBUTESIMPL_H
-#define LLVM_ATTRIBUTESIMPL_H
-
-#include "llvm/ADT/FoldingSet.h"
-
-namespace llvm {
-
-class Attributes;
-
-class AttributesImpl : public FoldingSetNode {
- friend class Attributes;
- uint64_t Bits; // FIXME: We will be expanding this.
-
-public:
- AttributesImpl(uint64_t bits) : Bits(bits) {}
-
- bool hasAttribute(uint64_t A) const;
-
- bool hasAttributes() const;
- bool hasAttributes(const Attributes &A) const;
-
- uint64_t getAlignment() const;
- uint64_t getStackAlignment() const;
-
- static uint64_t getAttrMask(uint64_t Val);
-
- void Profile(FoldingSetNodeID &ID) const {
- Profile(ID, Bits);
- }
- static void Profile(FoldingSetNodeID &ID, uint64_t Bits) {
- ID.AddInteger(Bits);
- }
-};
-
-} // end llvm namespace
-
-#endif
Modified: llvm/trunk/lib/VMCore/Attributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Attributes.cpp?rev=165920&r1=165919&r2=165920&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Attributes.cpp (original)
+++ llvm/trunk/lib/VMCore/Attributes.cpp Mon Oct 15 00:40:12 2012
@@ -12,6 +12,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Attributes.h"
+#include "AttributesImpl.h"
#include "LLVMContextImpl.h"
#include "llvm/Type.h"
#include "llvm/ADT/StringExtras.h"
@@ -67,6 +68,10 @@
return Attrs && Attrs->hasAttribute(Val);
}
+bool Attributes::hasAttributes() const {
+ return Attrs && Attrs->hasAttributes();
+}
+
bool Attributes::hasAttributes(const Attributes &A) const {
return Attrs && Attrs->hasAttributes(A);
}
Modified: llvm/trunk/lib/VMCore/LLVMContextImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContextImpl.h?rev=165920&r1=165919&r2=165920&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/LLVMContextImpl.h (original)
+++ llvm/trunk/lib/VMCore/LLVMContextImpl.h Mon Oct 15 00:40:12 2012
@@ -16,9 +16,9 @@
#define LLVM_LLVMCONTEXT_IMPL_H
#include "llvm/LLVMContext.h"
+#include "AttributesImpl.h"
#include "ConstantsContext.h"
#include "LeaksContext.h"
-#include "llvm/AttributesImpl.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Metadata.h"
More information about the llvm-commits
mailing list