HomePhabricator

DataLayout is mandatory, update the API to reflect it with references.
Audit RequiredrL231740

Description

DataLayout is mandatory, update the API to reflect it with references.

Summary:
Now that the DataLayout is a mandatory part of the module, let's start
cleaning the codebase. This patch is a first attempt at doing that.

This patch is not exactly NFC as for instance some places were passing
a nullptr instead of the DataLayout, possibly just because there was a
default value on the DataLayout argument to many functions in the API.
Even though it is not purely NFC, there is no change in the
validation.

I turned as many pointer to DataLayout to references, this helped
figuring out all the places where a nullptr could come up.

I had initially a local version of this patch broken into over 30
independant, commits but some later commit were cleaning the API and
touching part of the code modified in the previous commits, so it
seemed cleaner without the intermediate state.

Test Plan:

Reviewers: echristo

Subscribers: llvm-commits

From: Mehdi Amini <mehdi.amini@apple.com>

Details

Auditors
dsanders
Committed
mehdi_aminiMar 9 2015, 7:37 PM
Parents
rL231739: Update for LLVM API change: getOrEnforceKnownAlignment() requires a DataLayout
Branches
Unknown
Tags
Unknown