History log of /llvm-project/llvm/unittests/IR/ConstantsTest.cpp (Results 76 – 88 of 88)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 317c139f 19-Aug-2014 Duncan P. N. Exon Smith <dexonsmith@apple.com>

Reapply r215966, r215965, r215964, r215963, r215960, r215959, r215958, and r215957

This reverts commit r215981, which reverted the above commits because
MSVC std::equal asserts on nullptr iterators,

Reapply r215966, r215965, r215964, r215963, r215960, r215959, r215958, and r215957

This reverts commit r215981, which reverted the above commits because
MSVC std::equal asserts on nullptr iterators, and thes commits
introduced an `ArrayRef::equals()` on empty ArrayRefs.

ArrayRef was changed not to use std::equal in r215986.

llvm-svn: 215987

show more ...


# e4b91dca 19-Aug-2014 Aaron Ballman <aaron@aaronballman.com>

Reverting r215966, r215965, r215964, r215963, r215960, r215959, r215958, and r215957 (these commits all rely on previous commits) due to build breakage. These commits cause failed assertions when tes

Reverting r215966, r215965, r215964, r215963, r215960, r215959, r215958, and r215957 (these commits all rely on previous commits) due to build breakage. These commits cause failed assertions when testing Clang using MSVC 2013. The asserts are triggered from the std::equal call within ArrayRef::equals due to being passed invalid input (ArrayRef.begin() is returning a nullptr which is problematic).

llvm-svn: 215981

show more ...


# b11cd6fb 19-Aug-2014 Duncan P. N. Exon Smith <dexonsmith@apple.com>

IR: Fix ConstantArray::replaceUsesOfWithOnConstant()

Previously, `ConstantArray::replaceUsesOfWithOnConstant()` neglected to
check whether it becomes a `ConstantDataArray`. Call
`ConstantArray::get

IR: Fix ConstantArray::replaceUsesOfWithOnConstant()

Previously, `ConstantArray::replaceUsesOfWithOnConstant()` neglected to
check whether it becomes a `ConstantDataArray`. Call
`ConstantArray::getImpl()` to check for that.

llvm-svn: 215965

show more ...


Revision tags: llvmorg-3.5.0-rc2, llvmorg-3.5.0-rc1
# 64c1e180 03-Jun-2014 Rafael Espindola <rafael.espindola@gmail.com>

Allow alias to point to an arbitrary ConstantExpr.

This patch changes GlobalAlias to point to an arbitrary ConstantExpr and it is
up to MC (or the system assembler) to decide if that expression is

Allow alias to point to an arbitrary ConstantExpr.

This patch changes GlobalAlias to point to an arbitrary ConstantExpr and it is
up to MC (or the system assembler) to decide if that expression is valid or not.

This reduces our ability to diagnose invalid uses and how early we can spot
them, but it also lets us do things like

@test5 = alias inttoptr(i32 sub (i32 ptrtoint (i32* @test2 to i32),
i32 ptrtoint (i32* @bar to i32)) to i32*)

An important implication of this patch is that the notion of aliased global
doesn't exist any more. The alias has to encode the information needed to
access it in its metadata (linkage, visibility, type, etc).

Another consequence to notice is that getSection has to return a "const char *".
It could return a NullTerminatedStringRef if there was such a thing, but when
that was proposed the decision was to just uses "const char*" for that.

llvm-svn: 210062

show more ...


# f1bedd37 17-May-2014 Rafael Espindola <rafael.espindola@gmail.com>

Use create methods since msvc doesn't handle delegating constructors.

llvm-svn: 209076


# 83705658 17-May-2014 Rafael Espindola <rafael.espindola@gmail.com>

Reduce abuse of default values in the GlobalAlias constructor.

This is in preparation for adding an optional offset.

llvm-svn: 209073


Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1
# 6b238633 16-May-2014 Rafael Espindola <rafael.espindola@gmail.com>

Fix most of PR10367.

This patch changes the design of GlobalAlias so that it doesn't take a
ConstantExpr anymore. It now points directly to a GlobalObject, but its type is
independent of the aliasee

Fix most of PR10367.

This patch changes the design of GlobalAlias so that it doesn't take a
ConstantExpr anymore. It now points directly to a GlobalObject, but its type is
independent of the aliasee type.

To avoid changing all alias related tests in this patches, I kept the common
syntax

@foo = alias i32* @bar

to mean the same as now. The cases that used to use cast now use the more
general syntax

@foo = alias i16, i32* @bar.

Note that GlobalAlias now behaves a bit more like GlobalVariable. We
know that its type is always a pointer, so we omit the '*'.

For the bitcode, a nice surprise is that we were writing both identical types
already, so the format change is minimal. Auto upgrade is handled by looking
through the casts and no new fields are needed for now. New bitcode will
simply have different types for Alias and Aliasee.

One last interesting point in the patch is that replaceAllUsesWith becomes
smart enough to avoid putting a ConstantExpr in the aliasee. This seems better
than checking and updating every caller.

A followup patch will delete getAliasedGlobal now that it is redundant. Another
patch will add support for an explicit offset.

llvm-svn: 209007

show more ...


# 7e2b7567 13-May-2014 Rafael Espindola <rafael.espindola@gmail.com>

Assert that we don't RAUW a Constant with a ConstantExpr that contains it.

We already had an assert for foo->RAUW(foo), but not for something like
foo->RAUW(GEP(foo)) and would go in an infinite loo

Assert that we don't RAUW a Constant with a ConstantExpr that contains it.

We already had an assert for foo->RAUW(foo), but not for something like
foo->RAUW(GEP(foo)) and would go in an infinite loop trying to apply
the replacement.

llvm-svn: 208663

show more ...


Revision tags: llvmorg-3.4.1, llvmorg-3.4.1-rc2, llvmorg-3.4.1-rc1
# 56440fd8 06-Mar-2014 Ahmed Charles <ahmedcharles@gmail.com>

Replace OwningPtr<T> with std::unique_ptr<T>.

This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which ha

Replace OwningPtr<T> with std::unique_ptr<T>.

This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which have OwningPtr's as parameters. This should allow out of tree
projects some time to move. There are also no changes to libs/Target,
which should help out of tree targets have time to move, if necessary.

llvm-svn: 203083

show more ...


Revision tags: llvmorg-3.4.0, llvmorg-3.4.0-rc3, llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1, llvmorg-3.3.1-rc1, llvmorg-3.3.0, llvmorg-3.3.0-rc3, llvmorg-3.3.0-rc2, llvmorg-3.3.0-rc1
# 508baf79 23-Jan-2013 NAKAMURA Takumi <geek4civic@gmail.com>

llvm/unittests: Use OwningPtr to fix --vg-leak.

llvm-svn: 173240


# 0c8f08d3 23-Jan-2013 NAKAMURA Takumi <geek4civic@gmail.com>

IRTests/ConstantsTest.cpp: AsInstructionsTest: Delete each instruction immediately if it is not linked.

llvm-svn: 173236


# 2338264a 16-Jan-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com>

Allow vectors in CreatePointerCast of constants.

llvm-svn: 172615


# 74b6a77d 07-Jan-2013 Chandler Carruth <chandlerc@gmail.com>

Rename the VMCore unittest tree to IR. Somehow was missed when doing the
library rename.

llvm-svn: 171747


1234