diff --git a/lib/Support/TargetRegistry.cpp b/lib/Support/TargetRegistry.cpp index 258431a9372..258d703d16d 100644 --- a/lib/Support/TargetRegistry.cpp +++ b/lib/Support/TargetRegistry.cpp @@ -123,7 +123,7 @@ void TargetRegistry::RegisterTarget(Target &T, // Add to the list of targets. T.Next = FirstTarget; - FirstTarget = T.Next; + FirstTarget = &T; T.Name = Name; T.ShortDesc = ShortDesc;