DebugInfo: Write new DebugLoc API
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 30 Mar 2015 18:07:40 +0000 (18:07 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 30 Mar 2015 18:07:40 +0000 (18:07 +0000)
commit1c13197c9fb58709f7a59389bb5366cd4502315d
tree9e0435bf8f3b6215fa82b7a7493b7a48b6015ffe
parent3584797a17873c2692425db0bec64a9252879fc3
DebugInfo: Write new DebugLoc API

Rewrite `DebugLoc` with a cleaner API that reflects its current status
as a wrapper around an `MDLocation` pointer.

  - Add accessors/constructors to/from `MDLocation`.
  - Simplify construction from `MDNode`.
  - Remove unnecessary `LLVMContext` from APIs.
  - Drop some API that isn't useful any more.
  - Rewrite documentation.

Actually, I've left the old API behind temporarily at the bottom of the
class so that I can update callers in separate commits.  I'll remove it
once the callers are updated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233573 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/DebugLoc.h
lib/IR/DebugLoc.cpp